<template>
     <!-- basicData -->
     <div class="main-container" id="main-container">
        <div style="background-color: #fff; height:100%;" id="basicData">
           <a-tabs   :lazy-load="true" type="card" @change="tabsChange" justify>
                 <a-tab-pane title="染化料检验项目定义" key="1">
                     <div style="height: 100%;"> 
                        <DystuffProjectDifin /> 
                      </div> 
                 </a-tab-pane> 
                 <a-tab-pane title="复样类型定义" key="2">  
                     <div style="height: 100%;">
                          <DupSampleType />    
                      </div> 
                 </a-tab-pane>
                 <a-tab-pane title="对色光源定义" key="3">
                     <div style="height: 100%;"> 
                         <ColorSource />   
                     </div>  
                 </a-tab-pane>  
                 <a-tab-pane title="确认色类定义" key="4"> 
                     <div style="height: 100%;">
                         <ColorCategory />
                     </div>
                 </a-tab-pane>   
                 <a-tab-pane title="色系定义" key="5">
                     <div style="height: 100%;"> 
                         <ColorSystem />
                     </div>
                 </a-tab-pane>
                 <a-tab-pane title="打样组定义" key="6">
                     <div style="height: 100%;">
                         <ProofingGroup />
                     </div> 
                 </a-tab-pane>
                 <a-tab-pane title="复样进度类型定义" key="7"> 
                     <div style="height: 100%;">
                         <DupSampleSpeed /> 
                     </div>
                 </a-tab-pane>
                 <a-tab-pane title="颜色深浅" key="8">  
                     <div style="height: 100%;">
                         <ColorDepth />
                     </div> 
                 </a-tab-pane> 
                 <a-tab-pane title="试复样工艺类型" key="9">
                     <div style="height: 100%;">
                         <TrialDupSampleWorkmanship />
                     </div>
                 </a-tab-pane> 
           </a-tabs>
        </div>    
    </div>
 </template> 
 
 <script lang="ts">
   import { defineComponent,reactive } from 'vue'
   import emitter from '@/hooks/useEventBus'
   export default defineComponent({
        name:'basicData',
        setup() {
            const tabsChange = (e: string | number) => {
            //    pageData.tableIndex = e as string
                emitter.emit('window-change'); 
                if(e === '1'){
                    emitter.emit('refresh-DystuffProjectDifin')
                }else if(e === '2'){
                    emitter.emit('refresh-DupSampleType')
                }else if(e === '3'){
                    emitter.emit('refresh-ColorSource')
                }else if(e === '4'){
                    emitter.emit('refresh-ColorCategory')
                }else if(e === '5'){
                    emitter.emit('refresh-ColorSystem')
                }else if(e === '6'){
                    emitter.emit('refresh-ProofingGroup')
                }else if(e === '7'){
                    emitter.emit('refresh-DupSampleSpeed')
                }else if(e === '8'){
                    emitter.emit('refresh-ColorDepth')
                }else if(e === '9'){
                    emitter.emit('refresh-TrialDupSampleWorkmanship')
                }
            }
            return {
               tabsChange,
            }
        },
   }) 
 </script>
 
 <style scoped>
 .main-container {
     height: 100%;
 }
 :deep(.ag-cell) {
     border-right: 1px solid #dde2eb;
 }
 
 :deep(.ag-header-cell) {
     border-right: 1px solid #dde2eb;
 }
 
 :deep(.ag-cell-value) {
     user-select: initial;
     -moz-user-select: text;
     -ms-user-select: text;
     -webkit-user-select: text;
 }
 </style>